package com.gk.study.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("chat_message")
public class ChatMessage implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @TableField("sender_id")
    private String senderId;
    @TableField("receiver_id")
    private String receiverId;
    @TableField("content")
    private String content;
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

}